package com.wwtech.epp.ui.activity.work.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.work.ApproveDetailActivity;
import com.wwtech.epp.ui.activity.work.contract.ApproveDetailContract;
import com.wwtech.epp.ui.activity.work.presenter.ApproveDetailPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.work
 * @Description: The moduele of ApproveDetailActivity, provide field for ApproveDetailActivity
 * @date 2017/09/22 09:41:14
 */
@Module
public class ApproveDetailModule {
    private final ApproveDetailContract.View mView;


    public ApproveDetailModule(ApproveDetailContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public ApproveDetailPresenter provideApproveDetailPresenter(HttpAPIWrapper httpAPIWrapper, ApproveDetailActivity mActivity) {
        return new ApproveDetailPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public ApproveDetailActivity provideApproveDetailActivity() {
        return (ApproveDetailActivity) mView;
    }
}